home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / util_ghostscript.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-09-05  |  2.3 KB  |  57 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7.  
  8. /*!
  9.  * @brief GS utility fucntions
  10.  * Moved functions written or modified by various people over the time from util.cpp
  11.  * 
  12.  * @author Craig Bradney
  13.  */
  14. #ifndef _GSUTIL_H
  15. #define _GSUTIL_H
  16.  
  17. #include <QMap>
  18. #include <QPixmap>
  19. #include <QString>
  20. #include <QStringList>
  21.  
  22. #include "scribusapi.h"
  23.  
  24. QPixmap SCRIBUS_API LoadPDF(QString fn, int Page, int Size, int *w, int *h);
  25. /**
  26.  * @brief Call GhostScript synchronously and store output
  27.    *
  28.    * The gs commands are all similar and consist of a few constant
  29.    * arguments, the variable arguments and the end arguments which
  30.    * are also invariant. It will always use -q -dNOPAUSE and
  31.    * will always end with -c showpage -c quit. It also does automatic
  32.    * device selection unless overridden, and uses the user's antialiasing
  33.    * preferences and font search path.
  34.    *
  35.    * Shell metacharacters are not expanded - that includes quotes.
  36.    * @sa System .
  37.    *
  38.    * @param args_in Custom arguments to GhostScript
  39.    * @param device GS device to use (defaults to an image device if omitted)
  40.  */
  41. int     SCRIBUS_API callGS(const QStringList& args_in, const QString device="");
  42. int     SCRIBUS_API callGS(const QString& args_in, const QString device="");
  43. int     SCRIBUS_API convertPS2PS(QString in, QString out, const QStringList& opts, int level);
  44. int     SCRIBUS_API convertPS2PDF(QString in, QString out, const QStringList& opts);
  45. bool    SCRIBUS_API testGSAvailability( void );
  46. bool    SCRIBUS_API testGSAvailability( const QString& gsPath );
  47. bool    SCRIBUS_API testGSDeviceAvailability( const QString& device );
  48. /*! \brief Return gs version. If gs couldn't be found or there was a problem parsing output, return false
  49.  (in which case minor and major have undefined values).
  50.  \retval QString version or false on error */
  51. QString SCRIBUS_API getGSVersion();
  52. bool    SCRIBUS_API getNumericGSVersion(int & major, int & minor);
  53. bool    SCRIBUS_API getNumericGSVersion(const QString& ver, int&major, int& minor);
  54. QString SCRIBUS_API getGSDefaultExeName(void);
  55. QMap<int, QString> SCRIBUS_API getGSExePaths(const QString& regKey);
  56. #endif
  57.